package NewTmas.EditMode;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * Created by IntelliJ IDEA.
 * User: abhatnag
 * Date: 8/16/11
 * Time: 1:59 PM
 * To change this template use File | Settings | File Templates.
 */
public class UndoLastChangeListener implements ActionListener {
    EditIntFrame editIntFrame;
    public UndoLastChangeListener(EditIntFrame editIntFrame) {
           this.editIntFrame=editIntFrame;
    }

    public void actionPerformed(ActionEvent e) {
             editIntFrame.sqlCommands.remove(editIntFrame.sqlCommands.size()-1);
              editIntFrame.model.removeElementAt(editIntFrame.model.getSize()-1);
               editIntFrame.sqlcommandsList.setModel(editIntFrame.model);
    }
}
